def calculate(num1, operation, num2):
    if operation == "+":
        return int(num1) + int(num2)
    elif operation == "-":
        return int(num1) - int(num2)
    elif operation == "*":
        return int(num1) * int(num2)
    elif operation == "/":
        if int(num2) != 0:
            return int(num1) / int(num2)
        else:
            return "除数不能为0"
    else:
        return "无效的运算符"


